//
//  SIXTitleMenuViewController.m
//  weibo
//
//  Created by chenangel on 16/5/21.
//  Copyright © 2016年 chuhan. All rights reserved.
//

#import "SIXTitleMenuViewController.h"

@implementation SIXTitleMenuViewController

- (id)initWithStyle:(UITableViewStyle)style
{
    self = [super initWithStyle:style];
    if (self) {
        
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.tableView.backgroundColor = [UIColor grayColor];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 3;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *ID = @"cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    cell.contentView.tintColor = [UIColor colorWithWhite:0.247 alpha:1.000];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
    NSMutableDictionary *dict = [[NSMutableDictionary alloc]init];
    dict[NSFontAttributeName] = [UIFont systemFontOfSize:15];
    dict[NSForegroundColorAttributeName] = [UIColor whiteColor];
    cell.textAlignment = UITextAlignmentCenter;
    if (indexPath.row == 0) {

        NSAttributedString *str = [[NSAttributedString alloc]initWithString:@"好友" attributes: dict];
        cell.textLabel.attributedText = str;
        cell.backgroundColor = [UIColor grayColor];
    } else if (indexPath.row == 1) {

        NSAttributedString *str1 = [[NSAttributedString alloc]initWithString:@"密友" attributes: dict];
        cell.textLabel.attributedText = str1;
        cell.backgroundColor = [UIColor grayColor];

    } else if (indexPath.row == 2) {
        NSAttributedString *str2 = [[NSAttributedString alloc]initWithString:@"全部" attributes: dict];
        cell.textLabel.attributedText = str2;
        cell.textLabel.tintColor = [UIColor whiteColor];
        cell.backgroundColor = [UIColor grayColor];

    }
    
    return cell;
}
@end
